package game.items;

import edu.monash.fit2099.engine.actors.Actor;
import edu.monash.fit2099.engine.positions.GameMap;
import game.actors.Player;

/** Apple（a）：+3 HP；若是玩家，额外 +2 Hydration。 */
public class Apple extends Food {

    public Apple() {
        super("Apple", 'a');
    }

    @Override
    public String consumeEffect(Actor actor, GameMap map) {
        // 增加生命值
        actor.heal(3);
        if (actor instanceof Player p) {
            // 加水分
            p.addHydration(2);
            return actor + "吃掉一个苹果 (+3 HP, +2 Hydration)";
        }
        return actor + "吃掉一个苹果 (+3 HP)";
    }
}
